package chapter04;

import java.util.Scanner;

public class Day6 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入4位会员卡号：");
        int num = input.nextInt();
        int d=num/1000;
        int c=num/100%10;
        int b=num/10%10;
        int a=num%10;
        int sum = a+b+c+d;
        if (sum>=24){
            System.out.println("彩电一台");
        }
        else if(sum>=20 && sum<24){
            System.out.println("电吹风一部");
        }
        else if(sum>=16 && sum<20){
            System.out.println("餐巾纸一包");
        }
        else {
            System.out.println("下次继续努力");
        }
    }
}
